﻿using System;
using System.IO;

namespace SilverlightRestServices.Channels
{
    public sealed class RestMessageProperty : IDisposable
    {
        public static String Name { get { return "RestMessage"; } }

        public MemoryStream MessageData { get; private set; }

        public RestMessageProperty(MemoryStream messageData)
        {
            this.MessageData = messageData;
            this.MessageData.Position = 0;
        }

        public void Dispose()
        {
            this.MessageData.Dispose();
            this.MessageData = null;
        }
    }
}
